﻿@model WI.CandidateManager.Common.Data.Entities.Test

@{
    ViewBag.Title = @Resources.Common.CommonTestDetail;
}

<h2>@Resources.Common.CommonTestDetail</h2>

<table class="bordered">
    <tr>
        <td class="vertical-header">@Html.DisplayNameFor(model => model.Name)</td>
        <td>@Html.DisplayFor(model => model.Name, new { @class = "" })</td>
    </tr>
    <tr>
        <td class="vertical-header">@Html.DisplayNameFor(model => model.Description)</td>
        <td><pre>@Html.DisplayFor(model => model.Description, new { @class = "" })</pre></td>
    </tr>
    <tr>
        <td class="vertical-header">@Html.DisplayNameFor(model => model.State)</td>
        <td>@Html.DisplayFor(model => model.State, new { @class = "" })</td>
    </tr>
    <tr>
        <td class="vertical-header">Attachments</td>
        <td>@Html.ActionLink("Attachments (" + Model.Attachment.Count + ")", "List", "Attachment", new { area = "", entityID = Model.Id, returnUrl = this.Request.RawUrl }, new { @class = "common-btn BlueColor" })</td>
    </tr>
    <tr>
        <td class="vertical-header">@Html.DisplayNameFor(model => model.Owner.ShortName)</td>
        <td>@Html.DisplayFor(model => model.Owner.ShortName, new { @class = "" })</td>
    </tr>
</table>

<h3>@Resources.Common.CommonQuestionList</h3>

<table class="bordered">
    <thead>
        <tr>
            <th>@Resources.Common.CommonButtonDetails</th>
            <th>@Resources.Common.CommonColumnQuestionName</th>
            <th>@Resources.Common.CommonColumnAnswers</th>
        </tr>
    </thead>
    @foreach (var question in Model.QuestionBase)
    {
        <tr>
            <td class="Center column-detail">@Html.ActionLink(@Resources.Common.CommonButtonDetails, "DetailQuestion", new { @QuestionId = question.Id }, new { @class = "common-btn BlueColor" })</td>
            <td>@question.Text</td>
            <td>@question.AnswerBase.Count</td>
        </tr>
    }
</table>

<p>
    @Html.ActionLink(@Resources.Common.CommonButtonBack, "List", "Tests", new { @class = "common-btn-large BlueColor" })
</p>
